package com.jdaoyun.controller;


import cn.hutool.json.JSONObject;
import com.jdaoyun.execute.PushCode;
import com.jdaoyun.execute.Search;
import com.jdaoyun.result.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Slf4j
@RestController
@RequestMapping
public class controller {

    @Autowired
    private PushCode execute;
    @Autowired
    private Search search;


    @PostMapping("/stationOrg")
    public R<JSONObject> inde1() throws Exception {
        search.stationOrg();
        return null;
    }

    @PostMapping("/orgInfo")
    public R<JSONObject> indexConller11() throws Exception {
        execute.orgInfo();
        return null;
    }

    @PostMapping("/carInfo")
    public R<JSONObject> indexConller121() throws Exception {
        search.carInfo();
        return R.fail("进行查询");
    }


    @PostMapping("/carInfo1")
    public R<JSONObject> indexConller1211() throws Exception {
        execute.carInfo();
        return R.fail("推送");
    }

    @PostMapping("/driverInfo")
    public R<JSONObject> indexConller122() throws Exception {

        search.driver_Doctor_Nurse();
        return R.fail("查询");
    }

    @PostMapping("/driverInfo1")
    public R<JSONObject> indexConller1221() throws Exception {

        execute.driverInfo();
        return R.fail("推送");
    }

    @PostMapping("/doctorInfo")
    public R<JSONObject> indexConller123() throws Exception {

        execute.doctorInfo();

        return null;
    }

    @PostMapping("/rescueRecordAgencyTime")
    public R<JSONObject> indexConller124() throws Exception {
        //   return search.rescueRecordAgencyTime();
        execute.rescueRecordAgencyTime();//
        return R.fail("推送");
    }

    @PostMapping("/rescueRecordAgencyTime1")
    public R<JSONObject> indexConller1214() throws Exception {
        //   return search.rescueRecordAgencyTime();
        search.rescueRecordAgencyTime();
        return R.fail("查询");
    }

    @PostMapping("/emergencyAgencyTime")
    public R<JSONObject> indexConller125() throws Exception {

        //    return execute.emergencyAgencyTime();
        search.emergencyAgencyTime();
        return R.fail("查询");
    }

    @PostMapping("/emergencyAgencyTime1")
    public R<JSONObject> indexConller125112132() throws Exception {

        execute.emergencyAgencyTime();
        return null;
    }

    @PostMapping("/emergencyRecordTaskTime")
    public R<JSONObject> indexConller126() throws Exception {

        // return execute.emergencyRecordTaskTime();
        search.emergencyRecordTaskTime();

        return null;
    }

    @PostMapping("/emergencyRecordTaskTime11")
    public R<JSONObject> indexConller12611() throws Exception {

        execute.emergencyRecordTaskTime();
        return null;
    }

    @PostMapping("/emergencyRecordTaskDiagnosis")
    public R<JSONObject> indexConller127() throws Exception {

         execute.emergencyRecordTaskDiagnosis();

        return null;
    }

    @PostMapping("/emergencyRecordTaskDiagnosis111")
    public R<JSONObject> indexConller111127() throws Exception {

        search.emergencyRecordTaskDiagnosis();

        return null;
    }


    @PostMapping("/vehicleRealTimeLocation")
    public R<JSONObject> indexConller128() throws Exception {

         execute.vehicleRealTimeLocation();
        return null;
    }

    @PostMapping("/vehicleRealTimeLocation1")
    public R<JSONObject> indexConller1s28() throws Exception {

         search.vehicleRealTimeLocation();

        return null;
    }
}
